<template>
	<view>
		<view class="container">
			<view class="list">
				<view class="item" 
				v-for="(item,index) in list" :key="item+index"
				>
					<view class="time">
						申请时间：<text class="time2">{{item.createTime}}</text>
					</view>
					<view class="box">
						<view class="num">提现金额:{{item.applyAmount}}</view>
						<view>手续费:{{item.feeAmount}}</view>
					</view>
					
					<view class="state" v-if="item.status == 0">等待审核</view>
					<view class="state" style="color: #000000;border: 1px solid #000000;" v-if="item.status == 1">提现成功</view>
					<view class="state" style="color: #949494;border: 1px solid #949494;" v-if="item.status == 2">提现失败</view>
				</view>
			</view>
			
			<u-empty text="没有提现记录哦" mode="list" v-if="list.length == 0" margin-top="150"></u-empty>
		</view>
	</view>
</template>

<script>
	import * as api from '@/api/user/index.js';
	export default {
		data() {
			return {
				parmas:{
					pageNum:1,
					pageSize:20
				},
				list:[]
			}
		},
		onLoad(option){
			this.getDrawalLog();
		},
		methods: {
			async getDrawalLog(){
				try {
					let parmas = this.parmas;
					const ret = await api.withDrawalLog(parmas)
					console.log(ret)
					this.list = ret.data.obj.list;
				} catch (error) {
					
				}		
			}
		}
	}
</script>

<style lang="scss">
@import './index.scss';
</style>
